<?php echo $this->breadcrumb(); ?>

<form action="/hotel/dobooking/" method="post">

	<div id="mid-content">		  

		<!-- Mid Content Left aria start ............. -->			  

		<div class="mid-cont-left">

		<!-- Hot Tours start -->

			<div class="quarry-6">

				<span class="quarry-6-top"></span>

				<div class="quarry-6-mid">

					<h3 style="margin-left:10px;">Reservations</h3>

						<form name='frmBooking'>	
                                                    <div style="float: left;padding-left: 10px;">
                                                        <?php switch ($this->module) {
                                                            case 'excursion':
                                                                echo "<span style='text-transform:capitalize'>". $this->module . " - " . $this->module_arr['daydesc']."</span>";
                                                                echo "<input type='hidden' name='module' id='module' value='". $this->module. "'>";
                                                                echo "<input type='hidden' name='module_val' id='module_val' value='". $this->module_arr['daydesc']. "'>";                                                                
                                                                break;
                                                            case 'tour':
                                                                echo "<span style='text-transform:capitalize'>". $this->module . " - " . $this->module_arr['tour_title']."</span>";
                                                                echo "<input type='hidden' name='module' id='module' value='". $this->module. "'>";
                                                                echo "<input type='hidden' name='module_val' id='module_val' value='". $this->module_arr['tour_title']. "'>";                                                                
                                                                break;
                                                            case 'hotel':
                                                                echo "<span style='text-transform:capitalize'>". $this->module . " - " . $this->module_arr['hotel_title']."-".$this->module_arr['city_name']."</span>";
                                                                echo "<input type='hidden' name='module' id='module' value='". $this->module. "'>";
                                                                echo "<input type='hidden' name='module_val' id='module_val' value='". $this->module_arr['hotel_title']. "'>";                                                                
                                                                break;                                                            
                                                            default:
                                                                ?>
                                                                &nbsp;You have selected :&nbsp;<span style="color:#0066CC; font-weight:bold;"><?php echo $this->module_arr['hotel_title']; ?> - <?php echo $this->module_arr['city_name']; ?></span>
                                                                <?
                                                                echo "<input type='hidden' name='module' id='module' value='". $this->module_arr['hotel_title']. "'>";
                                                                echo "<input type='hidden' name='module_val' id='module_val' value='". $this->module_arr['city_name']. "'>";                                                                
                                                                break;
                                                        }?>                                                                
                                                        </div>
							<h1 class="h1-long-3">Booking Info :</h1>

								<div id="second-pan">

									<table cellspacing='0' cellpadding='0' border='0' id="table-main">

										<!--<tr>

											<td colspan="3" height="20" align='left' style="font-size:13px;"></td>

										</tr>-->

										<tr>

											<td colspan='4' class='blank_seperator' height='20'>

												<table width="100%" border="0">

													<tr>

														<td><hr size="1" style="color:#cccccc"/></td>

													</tr>

												</table>

											</td>

										</tr>

										<tr>

											<th width="140" height="" align='right' valign="middle" style="font-weight:bold;"><span style="font-weight:bold;">Check-in  :*&nbsp;</span></th>

											<td align="left" width="220" valign="middle" style="color:#CC6600; font-size:11px">

												<input name="checkin" id="checkin" value="" type="text" size="15" rel="tcal" class="style-one-req" />&nbsp;[mm/dd/yyyy]

											</td>

											<td width="120" align='right' valign="middle" style="font-weight:bold;"><span style="font-weight:bold;">Check-out  :*&nbsp;</span></td>

											<td width="220"align="left" valign="middle" style="color:#CC6600; font-size:11px">

												<input name="checkout" id="checkout" value="" type="text" size="15" rel="tcal" class="style-one-req" />&nbsp;[mm/dd/yyyy]

											</td>

										</tr>

									</table>

								</div>

								<div id="second-pan">

							 		<!-- No.of Nights section -->

									<table cellspacing='0' cellpadding='0' border='0' id="table-main">

										<tr>

											<th width="170" align='right' valign="middle" style="font-weight:bold;"><span style="font-weight:bold;">No. of Nights :&nbsp;&nbsp;&nbsp;</span></th>

											<td align="left" width="100" valign="middle" style="color:#333333; font-size:11px">

												<input name="no_nights" id="no_nights" value="" size="4" type="text" class="style-one" />

											</td>

											<td width="140" align='right' valign="middle" style="font-weight:bold;"><span style="font-weight:bold;">No. of Rooms :&nbsp;&nbsp;&nbsp;</span></td>

											<td align="left" width="450" height="48" valign="middle" style="color:#333333; font-size:11px">

												<input name="no_rooms" id="no_rooms" value="" size="4" type="text" class="style-one" />

											</td>

									  	</tr>

									</table>

							 	</div>
                                                                <?php if ($this->module!="hotel" && 1==2): //removed as requested by AN ?>
                                                                <div id="second-pan">

							 		<!-- Hotel selection section -->

									<table cellspacing='0' cellpadding='0' border='0' id="table-main">
                                                                        
                                                                            <tr>
                                                                                <td colspan="3">
                                                                                    <div style="float: left">
                                                                                        <div class="form-sect-1">
                                                                                            <label class="name-lable1"><?php echo $this->translate('%Country','quickbook'); ?> :</label>
                                                                                            <select name="hotel_country_booking" id="hotel_country_booking" size="1" class="style-one-req" style="width:110px;" onchange="return getCity(this.value);">
                                                                                                    <option value='0' selected="selected"> <?php echo $this->translate('%Country','quickbook'); ?></option>
                                                                                                    <option value='1'> <?php echo $this->translate('%Sri Lanka','quickbook'); ?> </option>
                                                                                                    <option value='2'> <?php echo $this->translate('%Maldives','quickbook'); ?> </option>				
                                                                                            </select>
                                                                                        </div>
                                                                                        <div class="form-sect-1">
                                                                                            <label class="name-lable1"><?php echo $this->translate('%City/Atoll','quickbook'); ?> :</label>
                                                                                            <select name="hotel_city_booking" size="1" id="hotel_city_booking" class="style-one-req" style="width:140px;" onchange="return getHotels(this.value);">
                                                                                                    <option value='#' selected="selected"> <?php echo $this->translate('%City/Atoll', 'quickbook'); ?></option>
                                                                                            </select>
                                                                                        </div>
                                                                                        <div class="form-sect-1">
                                                                                            <label class="name-lable1"><?php echo $this->translate('%Hotel','quickbook'); ?> :</label>
                                                                                            <select name="cmbhotel_booking" id="cmbhotel_booking" size="1" class="style-one-req" style="width:180px;">
                                                                                                    <option value='000' selected="selected"> <?php echo $this->translate('%Select a hotel', 'quickbook'); ?></option>				
                                                                                            </select>
                                                                                        </div>
                                                                                    </div>
                                                                                </td>
                                                                            </tr>
                                                                            
								</table>

							 	</div>	
                                                                <?php endif; ?>
                                                                <div id="second-pan">

							 		<!-- Room Category section -->

									<table cellspacing='0' cellpadding='0' border='0' id="table-main">
                                                                            
										<tr>

											<th width="170" align='right' valign="middle" style="font-weight:bold;"><span style="font-weight:bold;">Room Category :&nbsp;&nbsp;&nbsp;</span></th>

											<td align="left" width="100" valign="middle" style="color:#333333; font-size:11px">

											  	<select name="cmbRoomCat" id="cmbRoomCat" class="style-one-req" onchange="getRoomTypes()">

													<option value="">Room Category</option>

													<?php 

														foreach ($this->room_cat_arr as $room_cat_entry) :

													?>

														<option value="<?php echo $room_cat_entry['roomcat_id']; ?>"><?php echo $room_cat_entry['roomcat_type']; ?></option>

													<?php

														endforeach;

													?>										

												</select>						

											</td>

											<td width="150" align='right' valign="middle" style="font-weight:bold;"><span style="font-weight:bold;">Room Type :&nbsp;&nbsp;&nbsp;</span></td>

											<td align="left" width="350" valign="middle" style="color:#333333; font-size:11px">

											  	<select name="cmbRoomType" id="cmbRoomType" class="style-one-req">

													<option value="" selected="selected">Room Types</option>

												</select>	

											</td>

									  	</tr>

									</table>

							 	</div>							

								<div id="second-pan">

							 		<!-- Adult & Children section -->

									<table cellspacing='0' cellpadding='0' border='0' id="table-main">

										<tr>

											<th width="113" align='right' valign="middle" style="font-weight:bold;"><span style="font-weight:bold;">Adults :*&nbsp;</span></th>

											<td align="left" width="46" valign="middle" style="color:#333333; font-size:11px">

												<select name="adult" id="adult" class="style-one-req">

													<?php

														for ($j = 1; $j <= 30; $j++) {

													?>

														<option value="<?php echo $j; ?>"><?php echo $j; ?></option>

													<?php

														}

													?>													

												</select>

											</td>

                                            <td width="237" align='right' valign="middle" style="font-weight:bold;"><span style="font-weight:bold;">No. of infants(0-3 years) :&nbsp;&nbsp;&nbsp;</span></td>

											<td align="left" width="59" height="48" valign="middle" style="color:#333333; font-size:11px">

												<select name="infants" id="infants" class="style-one-req">

													<option value="">0</option>

													<?php

														for ($j = 1; $j <= 10; $j++) {

													?>

														<option value="<?php echo $j; ?>"><?php echo $j; ?></option>

													<?php

														}

													?>

												</select>

											</td>

											<td width="272" align='right' valign="middle" style="font-weight:bold;"><span style="font-weight:bold;">No. of children (3-12 years) :&nbsp;&nbsp;&nbsp;</span></td>

											<td align="left" width="140" height="48" valign="middle" style="color:#333333; font-size:11px">

												<select name="children" id="children" class="style-one-req">

													<option value="">0</option>

													<?php

														for ($j = 1; $j <= 10; $j++) {

													?>

														<option value="<?php echo $j; ?>"><?php echo $j; ?></option>

													<?php

														}

													?>	

												</select>

											</td>

									  	</tr>

									</table>

							 	</div>

							 	<div id="second-pan">

							 		<!-- Checkbox section -->

									<table width="549" border='0' cellpadding='0' cellspacing='0' id="table-main">

										<tr>

											<th width="152" height="24" align='right' valign="middle" style="color:#333333; font-size:11px"><input align="right" name="additional_info" id="additional_info" type="checkbox" value="additional_room" /></th>

											<td align="left" width="528" valign="top" style="font-weight:bold;"><span style="font-weight:bold; float:left; margin-top:6px;">&nbsp; Do you need an additional room?</span></td>

									  	</tr>

									  	<tr>

											<th align='right' height="28" valign="middle" style="color:#333333; font-size:11px"><input align="right" name="transfer_option" id="transfer_option" type="checkbox" value="airport_transfer" /></th>

											<td align="left" valign="top" style="font-weight:bold;">

                                            <span style="font-weight:bold; float:left; margin-top:8px; margin-right:4px;">&nbsp; Do you need an Airport Transfer?</span>

                                                  <div style="display:none; float:left;" id="transfertypediv">

                                                     <select name="transfertype" id="transfertype" class="style-one-req">

                                                     	<option value="">--select--</option>

                                                        <option value="By Air">BY Air</option>

                                                        <option value="By Road">By Road</option></select>

                                                   </div>

                                            </td>

                                                                                

									  	</tr>

									</table>

							 	</div>

								<h1 class="h1-long-3">Personal Info :</h1>

						 	 		<div id="second-pan">

										<table cellspacing='0' cellpadding='10' border='0' id="table-main">								  

											<tr>

												<td width="139" height="48" align='right' style="font-weight:bold;">Full Name :*&nbsp; </td>

												<td width="544"><input type='text' name='fullname' id='fullname' size='75' class="style-one-req" /></td>

										  	</tr>

										  	<tr>

												<td align='right' style="font-weight:bold;">E-mail :*&nbsp;</td>

												<td><input type='text' name='email' id='email' size='75' class="style-one-req" /></td>

										  	</tr>

										  	<tr>

												<td height="48" align='right' class='normal_field' style="font-weight:bold;">Contact No : &nbsp;&nbsp; </td>

												<td><input type='text' name='telephone' id='telephone' size='60' class="style-one" /></td>

										  	</tr>

										  	<tr>

												<td height="48" align='right' valign='top' style="font-weight:bold;">Address :&nbsp;&nbsp;&nbsp;</td>

												<td><textarea name='address' id='address' cols='57' rows='3' class="style-one"></textarea></td>

										  	</tr>

										  	<tr>

												<td  height="54" align='right' style="font-weight:bold;">Country :*&nbsp; </td>

												<td>

							 						<select name='country' id='country' size='1' style="width:380px" class="style-one-req">

														<option value='#'> Select Your Country</option>

														<?php 

															foreach ($this->country_arr as $country) :

														?>

															<option value="<?php echo $country['country_code']; ?>"><?php echo $country['country_name']; ?></option>

														<?php 

															endforeach;

														?>

													</select>	

							 					</td>

										  	</tr>

	

										  	<tr>

												<td align='right' valign='top' class='normal_field' style="font-weight:bold;">Comments :&nbsp;&nbsp;&nbsp;</td>

												<td class='element_label'><div id='reservations_form_comments_errorloc' class='error_strings' style="color:#FFFFFF;"></div>

													<textarea name='comments' id='comments' cols='71' rows='8' class="style-one"></textarea>                    

												</td>

										  	</tr>

										  	<tr>

												<td height="37" colspan='2' align='center'><input type='button' name='btnSendBooking' id='btnSendBooking' value='Send Booking Request' class='btn11 hand_cursor' onClick='sendBookingRequest()' />

												<input type="hidden" name="txtHotelId" id="txtHotelId" value="<?php echo $this->hotel_id; ?>" /></td>

										  	</tr>

										  	<tr>

												<td colspan='2' align='center' height="20"></td>

										  	</tr>

										</table>

									</td>

								</tr>

							</table>

						</div>

					</form>

				</div>

			</div>

		</div>

	</div>

</form>

<script type="text/javascript" src="/js/date.js"></script>

<script type="text/javascript">

$('#mid-content').mousemove(function() {

           var checkindate=$('#checkin').val();

           var checkoutdate=$('#checkout').val();

          /* alert(String(formatdatehere(checkindate)));

           alert(String(formatdatehere(checkoutdate)));*/

           var minutes = 1000*60;

           var hours = minutes*60;

           var days = hours*24;

                var foo_date1 = getDateFromFormat(String(formatdatehere(checkindate)), "d/M/y");

                var foo_date2 = getDateFromFormat(String(formatdatehere(checkoutdate)), "d/M/y");

               //alert(foo_date2-foo_date1);

                var diff_date = Math.round((foo_date2 - foo_date1)/days);

                if(diff_date>0)

                    {

                        $('#no_nights').val(diff_date);

                    }

                

                // alert("Diff date is: " + diff_date );

});



function formatdatehere(val)

{



 datearr=val.split("/")



 return datearr[1]+"/"+datearr[0]+"/"+datearr[2];

    

}

 $('#transfer_option').click(function() {

         //  var transferoption=$('#transferoptioin').val();

           if($('#transfer_option').attr('checked'))

           {

               $('#transfertypediv').show();

           }

           else

               {

                   $('#transfertypediv').hide();

               }

            

});

</script>

